package com.wx.chapter11.homework;

/**
 * @Author : 佩萁
 * Description :
 * @Create : 2023/6/14 - 9:49
 */
abstract public class Animal {
    abstract void shout();
}

class Cat extends Animal {
    @Override
    void shout() {
        System.out.println("猫会喵喵叫");
    }
}

class Dog extends Animal {
    @Override
    void shout() {
        System.out.println("狗会汪汪叫");
    }
}

class Test {
    public static void main(String[] args) {
        Animal cat = new Cat();
        Animal dog = new Dog();
        cat.shout();
        dog.shout();
    }
}